package multiplieralgorithm;
    
/**
 *
 * @author Kylan Robinson (krobinso@eecs.wsu.edu)
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int result;
        
        System.out.println(" ==========================");         
        System.out.println("||  HiPerCopS Washington  ||");
        System.out.println(" ==========================\n");        
        
        Multiplier multiplier;
        multiplier = new Multiplier(20, 4, 1);
        multiplier.printTypes();

        System.out.println("\n ---------------------------");        
        System.out.println("| Multiply Positive Numbers |");
        System.out.println(" ---------------------------\n");
        
        System.out.println("multiply 0 and 0");
        result = multiplier.multiply(0, 0);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 1 and 0");
        result = multiplier.multiply(1, 0);
        System.out.println(result);
        multiplier.printValues();

        System.out.println("multiply 0 and 1048575");
        result = multiplier.multiply(0, 1048575);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 1 and 1");
        result = multiplier.multiply(1, 1);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 2 and 2");
        result = multiplier.multiply(2, 2);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 4 and 4");
        result = multiplier.multiply(4, 4);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 32 and 32");
        result = multiplier.multiply(32, 32);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 128 and 128");
        result = multiplier.multiply(128, 128);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 512 and 512");
        result = multiplier.multiply(512, 512);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 2048 and 2048");
        result = multiplier.multiply(2048, 2048);
        System.out.println(result);
        multiplier.printValues();

        System.out.println("multiply 8192 and 8192");
        result = multiplier.multiply(8192, 8192);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 32768 and 32768");
        result = multiplier.multiply(32768, 32768);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 131072 and 131072");
        result = multiplier.multiply(131072, 131072);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 524287 and 524287");
        result = multiplier.multiply(524287, 524287);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("\n ---------------------------");
        System.out.println("| Multiply Negative Numbers |");
        System.out.println(" ---------------------------\n");
 
        System.out.println("multiply -1 and 1");
        result = multiplier.multiply(-1, 1);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply -4 and 1");
        result = multiplier.multiply(-4, 1);
        System.out.println(result);
        multiplier.printValues();        
        
        System.out.println("multiply 1 and -1");
        result = multiplier.multiply(1, -1);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply 4 and -1");
        result = multiplier.multiply(4, -1);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply -1 and -1");
        result = multiplier.multiply(-1, -1);
        System.out.println(result);
        multiplier.printValues();
        
        System.out.println("multiply -4 and -1");
        result = multiplier.multiply(-4, -1);
        System.out.println(result);
        multiplier.printValues();        
        
    }
}
